Modern data processing systems are capable of manipulating and displaying digital images on a display screen. These images may be still, such as a photograph, or moving, such as a movie. The data processing system treats the images as a source of data that may be displayed and manipulated by the user. A user may wish to alter the image by changing its size or location. Altering the size of the image is commonly referred to as “scaling” the image. Scaling an image means enlarging (upscaling) or shrinking (downscaling) the size of the image.
A digital image on a display screen, whether still or moving, is stored in memory as an array (also called a bitmap) of pixels (digital picture elements). Pixels in digitized color images typically include color components, or data bits, for luminance and for chrominance. When a color image is scaled, each of the color components must be scaled. The array contains conceptual rows and columns of pixels corresponding to horizontal rows and vertical columns on the display screen. The system that creates the image determines the number of pixels in each row and column. When the image is to be displayed in a system that uses the same number of pixels in each row and column as the source image, the image can be displayed directly.
But, sometimes the image is transmitted to a different system that uses a different number of pixels in each row and/or a different number of columns from the source image. Also, sometimes the user desires to change the size of the displayed image. In these cases, the system must scale (upscale or downscale) the image, so that the same image can be displayed using a new array of pixels. For example, an image comprising a 500 by 750 array of pixels must be scaled up before it can be displayed in a system that uses an array of 1024 by 768 pixels. Conversely, the same image must be scaled down before it can be displayed in a system using an array of only 256 by 192 pixels. To upscale an image, the system adds pixels. To downscale an image, the system removes pixels through a process called decimation.
Consider the following example of upscaling an image. A compressed video image may be stored with a size of 5 pixels per row (i.e., 5 vertical columns) and 3 pixels per column (i.e., 3 horizontal rows), for a total of 15 stored pixels representing the video image. This video image can be upscaled in both the vertical and horizontal directions for display. The upscaled video image size might be 7 pixels per row (7 vertical columns) and 5 horizontal rows, or 35 total pixels. In order to create the final video image, the system places the original 15 pixels at the appropriate locations within the final image. But, 35−15=20 pixels are still needed to complete the image. These 20 pixels have unknown pixel values, which the system must determine in order to produce a final image. (Of course, those skilled in the art will recognize that for some scaling factors, all 15 original pixels might not be used.)
Several methods are currently utilized to assign values to these unknown pixels when upscaling. One such method is called bilinear interpolation, which uses a weighted average of the pixel values surrounding the pixel having an unknown value, taking into account the relative location of the surrounding pixels. The weighted average value is then assigned to the pixel having the unknown value. The purpose of bilinear interpolation is to fill in a smooth transition between the known pixels.
Various devices and methods for downscaling an image are also available. They either rely on multiple decimation passes through the array, or they incorporate multiple samples (also called taps) of data from the array. Because of the extra processing required, these techniques suffer from degraded performance and high cost. Thus, there is a need for a technique that overcomes the problems of the prior art and provides downscaling with better performance at a lower cost.